package kr.hkit.powerjava.chapter06.submit2class;

class Ifwork05 {

	private int a, b, c;
	private int small;

	public Ifwork05(int a, int b, int c, int small) {
		this.a = a;
		this.b = b;
		this.c = c;
		this.small = small;
	}

	public int verySmall() {

		if (a > b) {
			if (b > c) {
				small = c;
			} else {
				small = b;
			}
		} else {
			if (b < c) {
				small = a;
			} else if (a < c) {
				small = a;
			} else {
				small = c;
			}
		}
		return small;
	}

	@Override
	public String toString() {
		return "입력한 수는 [a=" + a + ", b=" + b + ", c=" + c + ", 가장 작은 값은"
				+ verySmall() + "입니다." + "]";
	}
}
